package com.ruoyi.informfrontend.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.informfrontend.mapper.ServiceCenterMapper;
import com.ruoyi.informfrontend.domain.ServiceCenter;
import com.ruoyi.informfrontend.service.IServiceCenterService;

/**
 * 体系分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-17
 */
@Service
public class ServiceCenterServiceImpl implements IServiceCenterService 
{
    @Autowired
    private ServiceCenterMapper serviceCenterMapper;

    /**
     * 查询体系分类
     * 
     * @param id 体系分类主键
     * @return 体系分类
     */
    @Override
    public ServiceCenter selectServiceCenterById(Long id)
    {
        return serviceCenterMapper.selectServiceCenterById(id);
    }

    /**
     * 查询体系分类列表
     * 
     * @param serviceCenter 体系分类
     * @return 体系分类
     */
    @Override
    public List<ServiceCenter> selectServiceCenterList(ServiceCenter serviceCenter)
    {
        return serviceCenterMapper.selectServiceCenterList(serviceCenter);
    }

    /**
     * 新增体系分类
     * 
     * @param serviceCenter 体系分类
     * @return 结果
     */
    @Override
    public int insertServiceCenter(ServiceCenter serviceCenter)
    {
        serviceCenter.setCreateTime(DateUtils.getNowDate());
        return serviceCenterMapper.insertServiceCenter(serviceCenter);
    }

    /**
     * 修改体系分类
     * 
     * @param serviceCenter 体系分类
     * @return 结果
     */
    @Override
    public int updateServiceCenter(ServiceCenter serviceCenter)
    {
        serviceCenter.setUpdateTime(DateUtils.getNowDate());
        return serviceCenterMapper.updateServiceCenter(serviceCenter);
    }

    /**
     * 批量删除体系分类
     * 
     * @param ids 需要删除的体系分类主键
     * @return 结果
     */
    @Override
    public int deleteServiceCenterByIds(Long[] ids)
    {
        return serviceCenterMapper.deleteServiceCenterByIds(ids);
    }

    /**
     * 删除体系分类信息
     * 
     * @param id 体系分类主键
     * @return 结果
     */
    @Override
    public int deleteServiceCenterById(Long id)
    {
        return serviceCenterMapper.deleteServiceCenterById(id);
    }
}
